<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTaskTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('task', function (Blueprint $table) {
            $table->increments('id');
            $table->string('type')->default('0')->comment('任务类型');
            $table->tinyInteger('category')->comment('种类');
            $table->integer('singular')->comment('任务单数');
            $table->string('price')->default('')->comment('任务价格');
            $table->tinyInteger('valid_time')->comment('有效时间');
            $table->unsignedTinyInteger('is_recommend')->default('0')->nullable()->comment('是否推荐');
            $table->unsignedTinyInteger('is_good')->default('0')->nullable()->comment('是否优质');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('task');
    }
}
